package com.yonyou.cyxdms.basedata.service.repository.series;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yonyou.cyx.framework.dao.base.SuperMapper;
import com.yonyou.cyxdms.basedata.client.domains.vo.SeriesCacheVO;
import com.yonyou.cyxdms.basedata.service.entity.series.SeriesPO;
import com.yonyou.cyxdms.basedata.service.vo.CarserialInfoVO;
import com.yonyou.cyxdms.basedata.service.vo.series.SeriesDictVO;
import com.yonyou.cyxdms.basedata.service.vo.series.VehicleProductSeriesVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 车系
 *
 * @author 车系
 * @since 2018/12/10
 */
public interface SeriesMapper extends SuperMapper<SeriesPO> {

    public List<SeriesCacheVO> querySeriesByCondition(@Param("params") Map<String, Object> queryParam);

    /**
     * 根据品牌Id查询车系信息
     *
     * @param brandId
     * @param groupCode
     * @param appId
     * @return java.util.List<com.yonyou.cyxdms.basedata.client.domains.DTO.basedata.SeriesCacheVO>
     * @author Administrator
     * @since 2018/12/13
     */
    List<SeriesCacheVO> getSeriesByBrandId(@Param("brandId") Long brandId, @Param("groupCode") String groupCode, @Param("appId") String appId);

    /**
     * @description：据车系名称模糊查询
     * @author ：quankk
     * @date ：Created in 2019/1/15 11:49
     * @modified By：
     */
    List<SeriesCacheVO> seriesBySeriesName(@Param("appId") String appId, @Param("seriesName") String seriesName);

    /**
     * @description：查询所有车系
     * @author ：quankk
     * @date ：Created in 2019/1/15 15:23
     * @modified By：
     */
    List<SeriesCacheVO> allSeries(@Param("ownerCode") String ownerCode, @Param("appId") String appId);

    /**
     * 查询车系信息
     *
     * @param queryParam
     * @return java.util.List<com.yonyou.cyxdms.basedata.service.vo.series.VehicleProductSeriesVO>
     * @author renwd
     * @since 2019/7/10
     */
    List<VehicleProductSeriesVO> queryVehicleProductSeries(IPage page, @Param("params") Map<String, Object> queryParam);

    /**
     * 集团查询车系信息
     *
     * @param page
     * @param queryParam
     * @return java.util.List<com.yonyou.cyxdms.basedata.service.vo.series.VehicleProductSeriesVO>
     * @author renwd
     * @since 2019/7/18
     */
    List<VehicleProductSeriesVO> queryVehicleProductDcsSeries(IPage page, @Param("params") Map<String, Object> queryParam);

    /**
     * 导出车系
     *
     * @param queryParam
     * @return java.util.List<java.util.Map>
     * @author renwd
     * @since 2019/7/15
     */
    List<Map> exportExcelForSeries(@Param("params") Map<String, Object> queryParam);

    /**
     * 车系下拉框
     *
     * @param queryParam
     * @return java.util.List<com.yonyou.cyxdms.basedata.service.vo.series.SeriesDictVO>
     * @author renwd
     * @since 2019/7/16
     */
    List<SeriesDictVO> querySeriesDict(@Param("params") Map<String, Object> queryParam);

    /**
     * @Description: 有效车系下拉框
     * @Param: [brandId, appId]
     * @Return: java.util.List<com.yonyou.cyxdms.basedata.service.vo.series.SeriesDictVO>
     * @Author: lijun
     * @Date: 16:04 2019/8/22
     **/
    List<SeriesDictVO> getSeriesDict(@Param("appId") String appId,
                                     @Param("brandId") Long brandId);

    /**
     * @Description: 根据seriesCode 获取车型
     * @Param: [brandId, appId, seriesCode]
     * @Return: com.yonyou.cyxdms.basedata.service.vo.series.SeriesDictVO
     * @Author: lijun
     * @Date: 16:04 2019/8/22
     **/
    SeriesDictVO getByCode(@Param("appId")String appId, @Param("brandId")Long brandId,
                           @Param("seriesCode")String seriesCode);

    SeriesDictVO getByCodeOnly(@Param("appId")String appId, @Param("seriesCode")String seriesCode);

    List<Long> getIdListByCondition(@Param("seriesName")String seriesName);

    SeriesDictVO getByAppIdCode(@Param("appId")String appId,@Param("seriesCode")String seriesCode);

    /**
     * 主机厂和本店所有车系下拉框
     *
     * @param queryParam
     * @author Tansj
     * @since 2019/11/14
     */
    List<SeriesDictVO> querySeriesDictAll(@Param("params") Map<String, Object> queryParam);

    /**
     * 查询车系信息
     *
     * @param queryParam
     * @author Tansj
     * @since 2019/11/15
     */
    List<VehicleProductSeriesVO> queryVehicleProductSeriesPage(IPage page, @Param("params") Map<String, Object> queryParam);

    /**
     * 新增编辑界面本店面车系下拉框
     *
     * @param queryParam
     * @author Tansj
     * @since 2019/11/18
     */
    List<SeriesDictVO> querySeriesDictOwner(@Param("params") Map<String, Object> queryParam);

    /**
     * 新增编辑界面本店面车系下拉框
     *
     * @param queryParam
     * @author Tansj
     * @since 2019/11/18
     */
    List<SeriesDictVO> queryDcsSeriesDictOwner(@Param("params") Map<String, Object> queryParam);

    /**
     * 查询意向车型
     *
     * @param appId appId
     * @param brandId brandId
     * @param ownerCode ownerCode
     * @return java.util.List<com.yonyou.cyxdms.basedata.service.vo.CarserialInfoVO>
     * @author renwd
     * @since 2020/1/3
     */
    List<CarserialInfoVO> listCarSerial(@Param("appId") String appId, @Param("brandId") String brandId, @Param("ownerCode") String ownerCode);

    /**
     * 根据登录信息返回车系数据
     *
     * @param queryParam
     * @return java.util.List<com.yonyou.cyxdms.basedata.service.vo.series.VehicleProductSeriesVO>
     * @author caozx
     * @since 2020/12/8
     */
    List<VehicleProductSeriesVO> queryVehicleProductSeriesAll(@Param("params") Map<String, Object> queryParam);


    List<SeriesDictVO> querySeriesDictAllNoPar();
}
